package com.JDK8;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
        System.out.println("请输入一个数:");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime localDateTime = now.plusMonths(n);
        DateTimeFormatter pattern = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
        System.out.println(n+"个月后是"+localDateTime.format(pattern));
    }
}
